package com.asifrc.tw101;

import java.util.ArrayList;

/**
 * Created by asifrc on 2/11/14.
 */
public abstract class MultiLine {
    private ArrayList<Line> lines = new ArrayList<Line>();

    public MultiLine(int n) {
        draw(n);
    }

    public ArrayList<Line> getLines() {
        return lines;
    }

    protected void addLine(Line line) {
        lines.add(line);
    }

    abstract void draw(int n);

    @Override
    public String toString() {
        StringBuilder value = new StringBuilder();
        for (Line line : lines) {
            value.append(line.toString());
        }
        return value.toString();
    }
}
